<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>投诉记录修改</title>
<meta name="renderer" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport"
	content="width=device-width, initial-scale=1, maximum-scale=1">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="format-detection" content="telephone=no">

<link rel="stylesheet" href="./css/font.css">
<link rel="stylesheet" href="./css/index.css">
<script src="./lib/layui/layui.js" charset="utf-8"></script>
<script type="text/javascript" src="./js/index.js"></script>



<!--<style>
        .imgs{display: none;}
        .picture{display: none;}
    </style>-->

<!--百度编辑器-->
<script src="./ueditor/ueditor.config.js"></script>
<script src="./ueditor/ueditor.all.min.js"></script>
<script src="./ueditor/lang/zh-cn/zh-cn.js"></script>
</head>
<body>

	<div class="layui-card">
		<form class="layui-form layui-form-pane"
			action="${pageContext.request.contextPath}/AliPayServlet"
			id="update-form" method="post">
			<div class="layui-tab layui-tab-brief" lay-filter="docDemoTabBrief">
				<ul class="layui-tab-title">
					<li class="layui-this">缴费详情</li>
				</ul>

				<div class="layui-tab-content">
					<div class="layui-tab-item layui-show">
						
						<div class="layui-form-item">
							<label class="layui-form-label"> <span class='x-red'>*</span>缴费编号
							</label>
							<div class="layui-input-block">
								<input type="text" name="payNo" autocomplete="off" value=""
									readonly="readonly" class="layui-input" required="required">
							</div>
						</div>
						<div class="layui-form-item">
							<label class="layui-form-label"> <span class='x-red'>*</span>起始时间
							</label>
							<div class="layui-input-block">
								<input type="text" name="startTime" autocomplete="off" value=""
									class="layui-input" required="required" readonly="readonly">
								<!-- readonly只读 -->
							</div>
						</div>


						<div class="layui-form-item">
							<label class="layui-form-label"> <span class='x-red'>*</span>截止时间
							</label>
							<div class="layui-input-block">
								<input type="text" name="endTime" autocomplete="off" value=""
									class="layui-input" required="required" readonly="readonly">
							</div>
						</div>

						<div class="layui-form-item">
							<label class="layui-form-label"> <span class='x-red'>*</span>缴费类别
							</label>
							<div class="layui-input-block">
								<input type="text" name="payType" autocomplete="off" value=""
									class="layui-input" readonly="readonly">
							</div>
						</div>

					
							<div class="layui-form-item">
							<label class="layui-form-label"> <span class='x-red'>*</span>缴费金额
							</label>
							<div class="layui-input-block">
								<input type="text" name="payMoney" autocomplete="off" value=""
									class="layui-input" required="required"
									readonly="readonly">
							</div>
						</div>

						<div class="layui-form-item">
							<a class="layui-btn"  lay-filter="add"
								lay-submit="" id="payNow" onclick="pay_now()">立即缴费</a>
						</div>
						<!--</form>-->
						<div style="height: 100px;"></div>
					</div>


				</div>

			</div>
		</form>
	</div>
	<script src="lib/layui/layui.js" charset="utf-8"></script>
	<script src="js/x-layui.js" charset="utf-8"></script>
	<script type="text/javascript"
		src="${pageContext.request.contextPath}/back/js/jquery.js"></script>
	<script type="text/javascript"
		src="${pageContext.request.contextPath}/back/js/jquery-form.js"></script>
	<script type="text/javascript">
		$.getJSON("${pageContext.request.contextPath}/PayServlet",{op:"immediatelyPay",payNo:"${param.payNo}"},function(result,status,xhr){
			let payNo = result.data.payNo;
			let startTime = result.data.payStartTime.replace("T"," ");
			let endTime = result.data.payEndTime.replace("T"," ");
			let payType = result.data.payType.typeName;
			let payMoney = result.data.payMoney;
			$("input[name='payNo']").val(payNo);
			$("input[name='startTime']").val(startTime);
			$("input[name='endTime']").val(endTime);
			$("input[name='payType']").val(payType);
			$("input[name='payMoney']").val(payMoney);
		});
	</script>
	<script>
	//发起缴费
	function pay_now(){
		let payNo = $("input[name='payNo']").val();
		let payType = $("input[name='payType']").val();
		let payMoney = $("input[name='payMoney']").val();
	//	xadmin.add_tab('sss','http://www.baidu.com');
	//	xadmin.add_tab('支付页面','http://localhost:8080'+'${pageContext.request.contextPath}/AliPayServlet?payNo='+payNo+'&payMoney='+payMoney+'&payType='+payType);
	//	xadmin.open('缴费', "http://localhost:8080"+"${pageContext.request.contextPath}/AliPayServlet?payNo="+payNo+"&payMoney="+payMoney+"&payType="+payType,'500','400');
		//window.location.href="http://localhost:8080"+"${pageContext.request.contextPath}/AliPayServlet?payNo="+payNo+"&payMoney="+payMoney+"&payType="+payType;
		window.open("http://localhost:8080"+"${pageContext.request.contextPath}/AliPayServlet?payNo="+payNo+"&payMoney="+payMoney+"&payType="+payType,'_blank');
//	xadmin_show('缴费', "http://localhost:8080"+"${pageContext.request.contextPath}/AliPayServlet?payNo="+payNo+"&payMoney="+payMoney+"&payType="+payType,'500','400');	
		
		
	}
	
	
	
	
	</script>

</body>
</html>